package net.ikenway.springboot.demo.Dao;

import net.ikenway.springboot.demo.Model.Entity.Product;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author MasterKenway <zk@ikenway.net>
 * @Description
 * @date Created Date 12/10/2020
 */
public interface ProductRepository extends JpaRepository<Product, Long> {
    List<Product> findAllByDeleted(Boolean deleted);

    List<Product> findAllByProductSortSortNameAndDeleted(String sortName, boolean deleted);

    Product findProductByProductName(String productName);

    List<Product> findAllByProductSortSortId(Long sortId);
}
